package com.heer.gymnasium.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.heer.gymnasium.R;
import com.heer.model.SitePlaceInfoBean;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by heer on 17/4/11.
 */

public class SiteDetailsTicketAdapter extends ListAdapter<SitePlaceInfoBean> {
    public SiteDetailsTicketAdapter(Context context) {
        super(context);
    }

    @Override
    public int getCount() {
        return 10;
    }

    @Override
    public View getView(int position, View view, ViewGroup parent) {
        ViewHolder holder;
        if (view != null) {
            holder = (ViewHolder) view.getTag();
        } else {
            view = mInflater.inflate(R.layout.item_sites_ticket, parent, false);
            holder = new ViewHolder(view);
            view.setTag(holder);
        }

        return view;
    }

    static class ViewHolder {
        @BindView(R.id.image_ticket)
        ImageView imageTicket;
        @BindView(R.id.image_type)
        ImageView imageType;
        @BindView(R.id.tv_name)
        TextView tvName;
        @BindView(R.id.tv_price)
        TextView tvPrice;

        ViewHolder(View view) {
            ButterKnife.bind(this, view);
        }
    }
}
